package com.itheima.d1_junit;

import org.junit.*;

import static org.junit.Assert.*;

public class StringUtilTest {
    @Before
    public void before() {
        System.out.println("测试开始前执行...");
    }
    @After
    public void After() {
        System.out.println("测试开始后执行...");
    }
    @BeforeClass
    public static void beforeClass(){
        System.out.println("所有测试开始前执行...");
    }
    @AfterClass
    public static void AfterClass(){
        System.out.println("所有测试开始后执行...");
    }
    @Test
    public void printNumber() {
        StringUtil.printNumber("张三");
        StringUtil.printNumber("李四");
        StringUtil.printNumber(null);
    }

    @Test(timeout = 3000)
    public void getMaxIndex() {

        int helloWorld = StringUtil.getMaxIndex("hello world");
        System.out.println(helloWorld);
    }
}